<%@ include file = "/common/ini.jsp"%> 
<%@ include file = "/common/_log4j.jsp"%>
<%@ include file = "/common/_ApplicationContext_init.jsp"%>
<%@ include file = "/js/_js_for_select.jsp"%> 
<script>
    delAllOptions($('<%= request.getParameter("objId")%>'));
    <%
        if(request.getParameter("selectAll") != null)
        {
            logger.info("== 所有 ==");
            %>addOption($('<%= request.getParameter("objId")%>'),"","== 所有 ==");<%
        }
    %>
    <%
        if(request.getParameter("selectPlease") != null)
        {
            logger.info("== 请选择 ==");
            %>addOption($('<%= request.getParameter("objId")%>'),"","== 请选择 ==");<%
        }
    %>
    <%
        TypeManager typeManager = (TypeManager)applicationContext.getBean("typeManager");	
        if(request.getParameter("value") != null )
        {
            Type type = (Type)typeManager.get(request.getParameter("value"));
            if(type != null)
            {
                Object[] subs = type.getSubTypes().toArray();      
                for(int i = 0; i < subs.length; i ++)
                {
                    Type sub = (Type)subs[i];
                    %>addOption($('<%= request.getParameter("objId")%>'),"<%= sub.getId()%>","<%= sub.getName()%>");<%
                }//
            }   
        }// if 
    %>
</script>